package com.github.MrWub.key.event;

import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

public class PreKeyPressEvent extends Event implements Cancellable{
    private static final HandlerList handlers = new HandlerList();
    private Player player;
    private int keyNo;
    private boolean cancelled = false;

	public PreKeyPressEvent(final Player player,int keyNo) {
        this.player = player;
        this.keyNo = keyNo;
    }

    public Player getPlayer() {
        return player;
    }
    
    public int getKeyNo() {
    	return keyNo;
    }
    
    public HandlerList getHandlers() {
        return handlers;
    }
    
    
    public static HandlerList getHandlerList() {
        return handlers;
    }
    
	@Override
	public boolean isCancelled() {
		return this.cancelled;
	}

	@Override
	public void setCancelled(boolean is) {
		this.cancelled = is;
	}
}